package com.lanou3g.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.lanou3g.bean.Admin;
import com.lanou3g.bean.Menu;

public interface AdminMapper {
	//	根据用户名和密码查找用户,找到就返回Admin,找不到返回null
	public Admin findAdminByUsernameAndPassword(@Param("username") String username, @Param("password")String password);
	
	// 根据roleId获取菜单列表
	public List<Menu> getMenusByRoleId(Integer role);
	
	//更新Admin
	public int updateAdmin(Admin admin);
	
	//根据id查找用户
	public Admin findAdminById(Integer id);
	
	//获取所有的管理员
	public List<Admin> getAllAdmins();
	
	//根据username获取用户
	public Admin getAdminByUsername(String username);
	
	//插入指定的Admin
	public int insertAdmin(Admin admin);
	
	//删除指定id的Admin
	public int delAdminById(Integer id);
	
	//获取所有维修人员
	public List<Admin> getFixAdmins();
	
}
